Skip to content

Comments

Add Python 3.14 support#179

Merged
MaxGhenis merged 5 commits intomainfrom
upgrade-python-3.14
Feb 24, 2026
Merged

Add Python 3.14 support#179
MaxGhenis merged 5 commits intomainfrom
upgrade-python-3.14

Conversation

@MaxGhenis
Copy link
Contributor

@MaxGhenis MaxGhenis commented Oct 8, 2025

Summary

  • Adds Python 3.14 to package classifiers and CI test matrix (3.13 + 3.14)
  • Adds allow-prereleases: true to setup-python action for 3.14 support
  • Adds .python-version file for uv default
  • Fixes pre-existing ruff UP042 lint errors (use StrEnum instead of (str, Enum))
  • Removes redundant uv sync CI step that failed building from source on 3.14
  • Fixes date parsing for Python 3.14's changed ValueError message format
  • Adds fail-fast: false to CI matrix for better visibility

Context

policyengine-core recently merged Python 3.14 support, and PyTables 3.11.0 now has wheels for 3.14. This PR brings policyengine.py in line.

Fixes #178

Test plan

  • CI passes on Python 3.13
  • CI passes on Python 3.14
  • Lint check passes
  • Docs check passes

@MaxGhenis
Copy link
Contributor Author

Status Update

Python 3.14 was released on October 7, 2025. CI tests are currently failing because h5py doesn't have Python 3.14 wheels yet.

Current Situation

  • h5py has Python 3.14 wheels in nightly builds
  • Stable release (h5py 3.15) is being planned (issue #2651)
  • Building h5py from source is failing on Python 3.14

Next Steps

This PR will remain in draft status until h5py 3.15 is released on PyPI. Once that happens, CI should pass and the PR can be marked ready for review.

Tracking: h5py/h5py#2713

- Add Python 3.14 to classifiers and CI test matrix (3.13 + 3.14)
- Set python_requires >= 3.11
- Add .python-version for uv default
- Add allow-prereleases to setup-python for 3.14 support
- Add changelog entry

Fixes #178

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
MaxGhenis and others added 4 commits February 24, 2026 06:20
- Use StrEnum instead of (str, Enum) pattern (required by ruff UP042)
- Keep requires-python >= 3.13 since dependencies require it
- Keep ruff target-version at py313

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The uv sync step was redundant with uv pip install --system and caused
failures because it tried to build pydantic-core from source for 3.14
(PyO3 0.24.1 doesn't support 3.14 yet, but pre-built wheels do exist).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Python 3.14 changed the ValueError message for invalid days from
"day is out of range for month" to "day N must be in range 1..M for
month ...". Updated the check to handle both formats.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Prevents 3.13 job from being cancelled if 3.14 fails (or vice versa).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@MaxGhenis MaxGhenis marked this pull request as ready for review February 24, 2026 17:30
@MaxGhenis MaxGhenis merged commit 1bc15bd into main Feb 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade to Python 3.14

1 participant